package com.my.admin.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.my.admin.entity.Image;
import com.my.admin.mapper.ImageMapper;
import com.my.admin.service.ImageService;
import com.my.admin.util.ServiceImplCache;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

@Service
public class ImageServiceImpl extends ServiceImplCache<ImageMapper, Image> implements ImageService {

    @Override
    @Cacheable(value = "pageList")
    public IPage<Image> pageList(IPage<Image> page, Image image) {
        return baseMapper.pageList(page, image);
    }

    @Override
    @Cacheable(value = "randOne")
    public Image randOne() {
        return baseMapper.randOne();
    }

}
